package com.tax.enums;

public enum ReportStateEnum {

    REPORT_STATE_0(0, "验证码"),
    REPORT_STATE_1(1, "密码"),
    REPORT_STATE_2(2, "密码");

    private Integer code;
    private String desc;

    ReportStateEnum(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public static ReportStateEnum find(String code) {
        if (code == null) {
            return null;
        }
        for (ReportStateEnum s : values()) {
            if (s.code.equals(code)) {
                return s;
            }
        }
        return null;
    }
}
